/*
 * Selling Partner API for Listings Items
 *
 * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
 *
 * The version of the OpenAPI document: 2021-08-01
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.listings.items.v2021_08_01
{
    /// <summary>
    /// Summary details of a listings item for an Amazon marketplace.
    /// </summary>
    [DataContract(Name = "ItemSummaryByMarketplace")]
    public partial class ItemSummaryByMarketplace : IValidatableObject
    {
        /// <summary>
        /// Identifies the condition of the listings item.
        /// </summary>
        /// <value>Identifies the condition of the listings item.</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum ConditionTypeEnum
        {
            /// <summary>
            /// Enum NewNew for value: new_new
            /// </summary>
            [EnumMember(Value = "new_new")]
            NewNew = 1,

            /// <summary>
            /// Enum NewOpenBox for value: new_open_box
            /// </summary>
            [EnumMember(Value = "new_open_box")]
            NewOpenBox = 2,

            /// <summary>
            /// Enum NewOem for value: new_oem
            /// </summary>
            [EnumMember(Value = "new_oem")]
            NewOem = 3,

            /// <summary>
            /// Enum RefurbishedRefurbished for value: refurbished_refurbished
            /// </summary>
            [EnumMember(Value = "refurbished_refurbished")]
            RefurbishedRefurbished = 4,

            /// <summary>
            /// Enum UsedLikeNew for value: used_like_new
            /// </summary>
            [EnumMember(Value = "used_like_new")]
            UsedLikeNew = 5,

            /// <summary>
            /// Enum UsedVeryGood for value: used_very_good
            /// </summary>
            [EnumMember(Value = "used_very_good")]
            UsedVeryGood = 6,

            /// <summary>
            /// Enum UsedGood for value: used_good
            /// </summary>
            [EnumMember(Value = "used_good")]
            UsedGood = 7,

            /// <summary>
            /// Enum UsedAcceptable for value: used_acceptable
            /// </summary>
            [EnumMember(Value = "used_acceptable")]
            UsedAcceptable = 8,

            /// <summary>
            /// Enum CollectibleLikeNew for value: collectible_like_new
            /// </summary>
            [EnumMember(Value = "collectible_like_new")]
            CollectibleLikeNew = 9,

            /// <summary>
            /// Enum CollectibleVeryGood for value: collectible_very_good
            /// </summary>
            [EnumMember(Value = "collectible_very_good")]
            CollectibleVeryGood = 10,

            /// <summary>
            /// Enum CollectibleGood for value: collectible_good
            /// </summary>
            [EnumMember(Value = "collectible_good")]
            CollectibleGood = 11,

            /// <summary>
            /// Enum CollectibleAcceptable for value: collectible_acceptable
            /// </summary>
            [EnumMember(Value = "collectible_acceptable")]
            CollectibleAcceptable = 12,

            /// <summary>
            /// Enum ClubClub for value: club_club
            /// </summary>
            [EnumMember(Value = "club_club")]
            ClubClub = 13
        }


        /// <summary>
        /// Identifies the condition of the listings item.
        /// </summary>
        /// <value>Identifies the condition of the listings item.</value>
        [DataMember(Name = "conditionType", EmitDefaultValue = false)]
        public ConditionTypeEnum? ConditionType { get; set; }
        /// <summary>
        /// Defines Status
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum StatusEnum
        {
            /// <summary>
            /// Enum BUYABLE for value: BUYABLE
            /// </summary>
            [EnumMember(Value = "BUYABLE")]
            BUYABLE = 1,

            /// <summary>
            /// Enum DISCOVERABLE for value: DISCOVERABLE
            /// </summary>
            [EnumMember(Value = "DISCOVERABLE")]
            DISCOVERABLE = 2
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ItemSummaryByMarketplace" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ItemSummaryByMarketplace() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemSummaryByMarketplace" /> class.
        /// </summary>
        /// <param name="marketplaceId">A marketplace identifier. Identifies the Amazon marketplace for the listings item. (required).</param>
        /// <param name="asin">Amazon Standard Identification Number (ASIN) of the listings item..</param>
        /// <param name="productType">The Amazon product type of the listings item. (required).</param>
        /// <param name="conditionType">Identifies the condition of the listings item..</param>
        /// <param name="status">Statuses that apply to the listings item. (required).</param>
        /// <param name="fnSku">The fulfillment network stock keeping unit is an identifier used by Amazon fulfillment centers to identify each unique item..</param>
        /// <param name="itemName">The name or title associated with an Amazon catalog item..</param>
        /// <param name="createdDate">The date the listings item was created in ISO 8601 format. (required).</param>
        /// <param name="lastUpdatedDate">The date the listings item was last updated in ISO 8601 format. (required).</param>
        /// <param name="mainImage">mainImage.</param>
        public ItemSummaryByMarketplace(string marketplaceId = default(string), string asin = default(string), string productType = default(string), ConditionTypeEnum? conditionType = default(ConditionTypeEnum?), List<StatusEnum> status = default(List<StatusEnum>), string fnSku = default(string), string itemName = default(string), DateTime createdDate = default(DateTime), DateTime lastUpdatedDate = default(DateTime), ItemImage mainImage = default(ItemImage))
        {
            // to ensure "marketplaceId" is required (not null)
            if (marketplaceId == null)
            {
                throw new ArgumentNullException("marketplaceId is a required property for ItemSummaryByMarketplace and cannot be null");
            }
            this.MarketplaceId = marketplaceId;
            // to ensure "productType" is required (not null)
            if (productType == null)
            {
                throw new ArgumentNullException("productType is a required property for ItemSummaryByMarketplace and cannot be null");
            }
            this.ProductType = productType;
            // to ensure "status" is required (not null)
            if (status == null)
            {
                throw new ArgumentNullException("status is a required property for ItemSummaryByMarketplace and cannot be null");
            }
            this.Status = status;
            this.CreatedDate = createdDate;
            this.LastUpdatedDate = lastUpdatedDate;
            this.Asin = asin;
            this.ConditionType = conditionType;
            this.FnSku = fnSku;
            this.ItemName = itemName;
            this.MainImage = mainImage;
        }

        /// <summary>
        /// A marketplace identifier. Identifies the Amazon marketplace for the listings item.
        /// </summary>
        /// <value>A marketplace identifier. Identifies the Amazon marketplace for the listings item.</value>
        [DataMember(Name = "marketplaceId", IsRequired = true, EmitDefaultValue = true)]
        public string MarketplaceId { get; set; }

        /// <summary>
        /// Amazon Standard Identification Number (ASIN) of the listings item.
        /// </summary>
        /// <value>Amazon Standard Identification Number (ASIN) of the listings item.</value>
        [DataMember(Name = "asin", EmitDefaultValue = false)]
        public string Asin { get; set; }

        /// <summary>
        /// The Amazon product type of the listings item.
        /// </summary>
        /// <value>The Amazon product type of the listings item.</value>
        [DataMember(Name = "productType", IsRequired = true, EmitDefaultValue = true)]
        public string ProductType { get; set; }

        /// <summary>
        /// Statuses that apply to the listings item.
        /// </summary>
        /// <value>Statuses that apply to the listings item.</value>
        [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)]
        public List<ItemSummaryByMarketplace.StatusEnum> Status { get; set; }

        /// <summary>
        /// The fulfillment network stock keeping unit is an identifier used by Amazon fulfillment centers to identify each unique item.
        /// </summary>
        /// <value>The fulfillment network stock keeping unit is an identifier used by Amazon fulfillment centers to identify each unique item.</value>
        [DataMember(Name = "fnSku", EmitDefaultValue = false)]
        public string FnSku { get; set; }

        /// <summary>
        /// The name or title associated with an Amazon catalog item.
        /// </summary>
        /// <value>The name or title associated with an Amazon catalog item.</value>
        [DataMember(Name = "itemName", EmitDefaultValue = false)]
        public string ItemName { get; set; }

        /// <summary>
        /// The date the listings item was created in ISO 8601 format.
        /// </summary>
        /// <value>The date the listings item was created in ISO 8601 format.</value>
        [DataMember(Name = "createdDate", IsRequired = true, EmitDefaultValue = true)]
        public DateTime CreatedDate { get; set; }

        /// <summary>
        /// The date the listings item was last updated in ISO 8601 format.
        /// </summary>
        /// <value>The date the listings item was last updated in ISO 8601 format.</value>
        [DataMember(Name = "lastUpdatedDate", IsRequired = true, EmitDefaultValue = true)]
        public DateTime LastUpdatedDate { get; set; }

        /// <summary>
        /// Gets or Sets MainImage
        /// </summary>
        [DataMember(Name = "mainImage", EmitDefaultValue = false)]
        public ItemImage MainImage { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ItemSummaryByMarketplace {\n");
            sb.Append("  MarketplaceId: ").Append(MarketplaceId).Append("\n");
            sb.Append("  Asin: ").Append(Asin).Append("\n");
            sb.Append("  ProductType: ").Append(ProductType).Append("\n");
            sb.Append("  ConditionType: ").Append(ConditionType).Append("\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  FnSku: ").Append(FnSku).Append("\n");
            sb.Append("  ItemName: ").Append(ItemName).Append("\n");
            sb.Append("  CreatedDate: ").Append(CreatedDate).Append("\n");
            sb.Append("  LastUpdatedDate: ").Append(LastUpdatedDate).Append("\n");
            sb.Append("  MainImage: ").Append(MainImage).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
